package com.zjtaixue.usersite.service;

import com.alibaba.fastjson.JSONObject;
import com.zjtaixue.usersite.domain.Student;
import com.zjtaixue.usersite.page.PageResult;
import com.zjtaixue.usersite.query.StudentQueryObject;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.text.ParseException;
import java.util.List;

public interface StudentService {
    void insert(Student student);

    Student getById(Integer id);

    /**
     * 学生的高级查询加分页
     *
     * @param qo
     * @return
     */
    PageResult<JSONObject> listPageResult(StudentQueryObject qo);

    void update(Student student);

    int deleteById(Integer id);

    /**
     * 读EXCEL文件，获取学生信息集合
     */
    List<Student> gainInfo(InputStream is);

    /**
     * 读取Excel里面学生的信息
     *
     * @param wb
     * @return
     */
    List<Student> readValue(Workbook wb) throws ParseException;

    List<Student> listByClassId(Integer classId);

    List<Student> listByMajorId(Integer majorId);

    List<Student> listByKeyword(String keyword);

    List<Student> listAll();

    int disabledById(Integer id);

    int enableById(Integer id);

    /**
     * 根据学号得到学生信息
     * @param number
     * @return
     */
    Student selectByNumber(String number);

    String listStudentInfosByCalssId(Integer classId);

}
